#include <stdio.h>
// 全局变量，在一个地方变了，其他地方也变了
int units = 0;

void critic(void);

int main(void)
{
    // 以下语句可有可无
    extern int units;
    printf("How many pounds to a firkin of butter?\n");
    scanf("%d", &units);
    while (units != 56)
        critic();
    printf("You must have looked it up!\n");
    return 0;
}

void critic(void)
{
    // 以下语句可有可无
    // extern int units;
    /* 删除了可选的重复声明 */
    printf("No luck, my friend. Try again.\n");
    scanf("%d", &units);
}